package com.syni.mdd.yhd.common.all.dao.jpa;

import com.syni.mdd.yhd.common.all.dao.BaseJPADao;
import com.syni.mdd.yhd.common.all.entity.BmsBusiness;
import com.syni.mdd.yhd.common.all.entity.BmsDxCoupon;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Set;

public interface BmsDxCouponDao extends BaseJPADao<BmsDxCoupon,Integer> {
    List<BmsDxCoupon> findByBmsBusinessId(Integer businessId, Pageable pageable);

    BmsDxCoupon findByIdAndIsDelete(Integer couponId,Integer isDelete);

    /**通过店铺和买单类型查找**/
    List<BmsDxCoupon> findByBmsBusinessIdAndType(Integer businessId,Integer type);

    /**通过店铺和买单类型查找**/
    List<BmsDxCoupon> findByBmsBusinessIdInAndType(Set businessId,Integer type);
}
